package com.senven.common.user.controller;



import com.senven.common.user.util.OSScq;
import com.senven.common.vo.CommonResult;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

@RestController
@RequestMapping("user")
public class UploadController {
    /**
     * 用户头像上传的接口
     * @param file
     * @return
     */
    @ApiOperation(value = "用户头像上传的接口")

    @PostMapping("upload")
    public String upload(MultipartFile file) {
        String url = OSScq.uploadUrl(file);
        // System.out.println(url+"=======URL===========");
        return url;
    }


}
